﻿Imports Microsoft.VisualBasic
Imports System.Net.Mail
Namespace OneCall.EmailGateway
    Public Module EMailSender
        Public Sub SendWebEmail(ByVal Receipent As String, ByVal Subject As String, ByVal Message As String)
            Dim SmtpServer As New SmtpClient()
            Dim mail As New MailMessage()
            SmtpServer.Credentials = New  _
            Net.NetworkCredential("info@onecallhomecaresolution.com", "1C@lh0me")
            'SmtpServer.Port = 587
            SmtpServer.Host = "mail.onecallhomecaresolution.com"
            mail = New MailMessage()
            mail.IsBodyHtml = True
            mail.From = New MailAddress("info@onecallhomecaresolution.com", "OneCallHomeCareSolution")
            mail.To.Add(Receipent)
            mail.Subject = Subject
            mail.Body = Message

            Try
                SmtpServer.Send(mail)
            Catch ex As Exception

            End Try
        End Sub
    End Module
End Namespace


